class SyncLoopHook {
    constructor() {
        this.tasks = [];
    }
    tap(name, task) {
        this.tasks.push(task);
    }
    call(...args) {
        this.tasks.forEach(task => {
            let result;
            do {
                result = task(...args)
            } while(result != undefined)
        })
    }
}

module.exports = SyncLoopHook;